function saveChange(){
	var oldpass = $("#oldpass").val();
	var newpass = $("#newpass").val();
	var confirm = $("#confirmpass").val();
	if(oldpass == "" || newpass == "" || confirm == ""){
		return false;
	}
	if(newpass == confirm){
		var data = {func : "updatePreferences",
				oldpass : oldpass,
				newpass : newpass,
				confirm : confirm
				};
		var url = "/generlicLogicService";
		simpleservice(url,data,saveSuccess);
	}else{
		simpleDialog("New password and confirm password is not same.");
	}
	
}

function saveSuccess(data){
	var objArray = new Array();
	objArray = JSON.parse(data);
	var checkLogOut = checkSessionAdmin(objArray);
	if(checkLogOut)
		return;
	if(!objArray){
		simpleDialog("Old Password doesn't match");
	}else{
		simpleDialog("Change Password Complete");
		$("#oldpass").val("");
		$("#newpass").val("");
		$("#confirmpass").val("");
	}
}